package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName wf_cases
 */
@TableName(value ="wf_cases")
@Data
@KeySequence(value ="SEQ_WF_WORKFLOW")
public class WfCases implements Serializable {
    /**
     * 工作流操作历史ID
     */
    @TableId(type = IdType.INPUT)
    private Integer caseid;

    /**
     * 工作流ID
     */
    private Integer wfid;

    /**
     * 来源ID
     */
    private Integer originalid;

    /**
     * 状态
     */
    private String status;

    /**
     * 申请人
     */
    private String applyusr;

    /**
     * 申请日期
     */
    private Date applydt;

    /**
     * 关闭人
     */
    private String closeusr;

    /**
     * 关闭日期
     */
    private Date closedt;

    /**
     * 取消人
     */
    private String cancelusr;

    /**
     * 取消日期
     */
    private Date canceldt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WfCases other = (WfCases) that;
        return (this.getCaseid() == null ? other.getCaseid() == null : this.getCaseid().equals(other.getCaseid()))
            && (this.getWfid() == null ? other.getWfid() == null : this.getWfid().equals(other.getWfid()))
            && (this.getOriginalid() == null ? other.getOriginalid() == null : this.getOriginalid().equals(other.getOriginalid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getApplyusr() == null ? other.getApplyusr() == null : this.getApplyusr().equals(other.getApplyusr()))
            && (this.getApplydt() == null ? other.getApplydt() == null : this.getApplydt().equals(other.getApplydt()))
            && (this.getCloseusr() == null ? other.getCloseusr() == null : this.getCloseusr().equals(other.getCloseusr()))
            && (this.getClosedt() == null ? other.getClosedt() == null : this.getClosedt().equals(other.getClosedt()))
            && (this.getCancelusr() == null ? other.getCancelusr() == null : this.getCancelusr().equals(other.getCancelusr()))
            && (this.getCanceldt() == null ? other.getCanceldt() == null : this.getCanceldt().equals(other.getCanceldt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCaseid() == null) ? 0 : getCaseid().hashCode());
        result = prime * result + ((getWfid() == null) ? 0 : getWfid().hashCode());
        result = prime * result + ((getOriginalid() == null) ? 0 : getOriginalid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getApplyusr() == null) ? 0 : getApplyusr().hashCode());
        result = prime * result + ((getApplydt() == null) ? 0 : getApplydt().hashCode());
        result = prime * result + ((getCloseusr() == null) ? 0 : getCloseusr().hashCode());
        result = prime * result + ((getClosedt() == null) ? 0 : getClosedt().hashCode());
        result = prime * result + ((getCancelusr() == null) ? 0 : getCancelusr().hashCode());
        result = prime * result + ((getCanceldt() == null) ? 0 : getCanceldt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", caseid=").append(caseid);
        sb.append(", wfid=").append(wfid);
        sb.append(", originalid=").append(originalid);
        sb.append(", status=").append(status);
        sb.append(", applyusr=").append(applyusr);
        sb.append(", applydt=").append(applydt);
        sb.append(", closeusr=").append(closeusr);
        sb.append(", closedt=").append(closedt);
        sb.append(", cancelusr=").append(cancelusr);
        sb.append(", canceldt=").append(canceldt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}